package cn.selfiot.iotman.view.item;

import cn.selfiot.iotman.model.mqtt.messge.ActionItem;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;

import java.net.URL;
import java.util.ResourceBundle;

/**
 * @author hugo
 * @since 2020/8/14
 */
public class ListItemController implements Initializable {
    private ActionItem actionItem;
    
    @FXML
    public Label lbItemTitle;
    
    @Override
    public void initialize(URL location, ResourceBundle resources) {
        if (actionItem != null) {
            lbItemTitle.setText(actionItem.getTopic().getTopicString());
        }
    }
    
    public ActionItem getActionItem() {
        return actionItem;
    }
    
    public void setActionItem(ActionItem actionItem) {
        this.actionItem = actionItem;
    }
}
